:global(.webchat) .collapsible-content {
  display: grid;

  &[open] .collapsible-content__chevron {
    transform: rotate(180deg);
  }

  &[open] .collapsible-content__summary {
    margin-block-end: 0;
  }
}

:global(.webchat) .collapsible-content__summary {
  cursor: pointer;
  display: inline-flex;
  font-family: var(--webchat__font--primary);
  gap: calc(var(--webchat__padding--regular) / 2);
  justify-self: self-start;
  list-style: none;
  margin: var(--webchat__padding--regular);
  padding: 0;

  &::-webkit-details-marker {
    display: none;
  }

  &:focus-visible {
    outline-offset: 3px;
  }
}

:global(.webchat) .collapsible-content__summary-text {
  flex: auto;
}

:global(.webchat) .collapsible-content__chevron {
  transition: transform var(--webchat__transition-duration) var(--webchat__transition-easing);
}

:global(.webchat) .collapsible-content__content {
  display: flex;
  flex-direction: column;
}
